/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.activity.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ykht.proj.activity.entity.VCard;
import com.ykht.proj.activity.entity.VGroupShop;
import com.ykht.proj.activity.vo.*;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnLabel;
import com.ykht.proj.coupon.vo.BaseLonLat;

import java.math.BigDecimal;
import java.util.List;

/**
 * 卡表
 *
 * @author csg
 * @date 2021-05-21 14:21:47
 */
public interface VCardService extends IService<VCard> {

	
	/**
	 * 添加卡
	 *
	 * @param vCardVo
	 */
	void addCard(VCardVo vCardVo);

	/**
	 * 修改卡片
	 * @param vCardVo
	 */
	void updateCard(VCardVo vCardVo);
	List<CnLabel> cardLabel(Long cardId);
	List<VCardInfo.ShopVo> shopVoListByCardId(BaseLonLat lonLat,Long cardId);
	List<VCardInfo.ShopVo> shopVoListByVId(BaseLonLat lonLat,Long VId,Long cardId);

    Page cardPage(Page page, VCard vCard, BaseLonLat baseLonLat);

	VCardInfo getCardInfo(Long id, BaseLonLat lonLat);

	/**
	 * 获取创建活动的 卡列表分页查询
	 * @param page 分页
	 * @param vCardVo 条件
	 * @return
	 */
	IPage<VCardVo> getByActivityAndCardPage(Page page, VCardVo vCardVo);

	/**
	 * 获取企业购买卡 列表分页查询
	 * @param page    分页
	 * @param vCardVo 条件
	 * @return
	 */
    IPage<VCardVo> getEntBuyCardPage(Page page, VCardVo vCardVo);

	/**
	 *	批量修改 卡库存
	 * @param cardList
	 */
    void updateBatch(List<VCard> cardList);

	List<Card4C> cardList(Card4CReq req, BaseLonLat lonLat);

	List<CardShopVo> shopByCardIds(List<Long> cardIds);

	ActivityInfo getActivityInfo(Card4CReq req, BaseLonLat lonLat);

	/**
	 * 企业绑定卡  给卡添加激活数量+1
	 * @param id
	 */
    void updateActivationVolume(Long id);

	/**
	 * 添加库存（加减库存）
	 * @param vCardVo
	 */
	void addStockNumber(VCardVo vCardVo);

	R UpdateFxFlag(Long id, Integer fxFlag, BigDecimal returnPercentage);

	VCardInfo4PC getCardInfo4PC(Long id);
}
